-
Notifications
You must be signed in to change notification settings - Fork 149
Refactor the DirectionalNavigationAdapter
#592
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the DirectionalNavigationAdapter to support a configurable pointer-based navigation system while updating related tap/key handling in the visual reader.
- Updated VisualReaderViewController to use the new pointer configuration and observer event types.
- Modified PointerEvent to conform to CaseIterable.
- Refactored DirectionalNavigationAdapter to introduce PointerPolicy and KeyboardPolicy while deprecating older parameters.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
TestApp/Sources/Reader/Common/VisualReaderViewController.swift | Updated adapter instantiation and changed event observers from tap to activate. |
Sources/Navigator/Input/Pointer/PointerEvent.swift | Added CaseIterable conformance to PointerType. |
Sources/Navigator/DirectionalNavigationAdapter.swift | Refactored configuration options (PointerPolicy and KeyboardPolicy), updated binding logic, and deprecated older initializer. |
31b29bf
to
338d16d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR refactors the DirectionalNavigationAdapter by updating its configuration options and enhancing pointer and keyboard policies. Key changes include:
- Changing observer event types in VisualReaderViewController from .tap to .activate.
- Updating PointerType to conform to CaseIterable.
- Reorganizing the DirectionalNavigationAdapter with new PointerPolicy and KeyboardPolicy structures and deprecating the old TapEdges initializer.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
TestApp/Sources/Reader/Common/VisualReaderViewController.swift | Updated pointer event observers to use .activate instead of .tap, aligning with the new pointer policy. |
Sources/Navigator/Input/Pointer/PointerEvent.swift | Extended PointerType with CaseIterable for easier pointer type iteration. |
Sources/Navigator/DirectionalNavigationAdapter.swift | Refactored configuration by introducing PointerPolicy and KeyboardPolicy, with adjustments to initializer logic and deprecation of old TapEdges. |
Comments suppressed due to low confidence (1)
TestApp/Sources/Reader/Common/VisualReaderViewController.swift:89
- The change from .tap to .activate should be thoroughly verified to ensure it aligns with the intended pointer event handling defined in the new PointerPolicy. Consider confirming that all affected event behaviors are consistent with the adapter’s updated configuration.
navigator.addObserver(.activate { [weak self] _ in
03ce40d
to
bd618a8
Compare
DirectionalNavigationAdapter
configuration option.